/**
 * Created by Administrator on 2018/6/27.
 */
/**
 * Created by Administrator on 2018/4/24.
 */
/**
 * Created by zackey on 2016/5/28.
 */
var messages = new Vue();
define(function (require,exports,module) {

    const routes = [


        {
            path: '/foo', component: function (resolve) {
            require.async(['modules/Foo.js'],resolve);
        }
        },{
            path: '/bar', component: function (resolve) {
                require.async(['${mvc}/res/modules/Bar.js'],resolve);
            }
        },{
            path: '/appointment/enter', component: function (resolve) {
                require.async(['modules/appointment/enter/enter.js'],resolve);
            }
        },{
            path: '/appointment/examine', component: function (resolve) {
                require.async(['modules/appointment/examine/examine.js'],resolve);
            }
        },{
            path: '/sysSetting/rooms', component: function (resolve) {
                require.async(['modules/sysSetting/rooms/room.js'],resolve);
            }
        },{

            path: '/sigin/sigin/', component: function (resolve) {
                require.async(['modules/sigin/sigin/sigin.js'],resolve);
            }
        },{
            path: '/sigin/serviceStatus/', component: function (resolve) {
                require.async(['modules/sigin/serviceStatus/serviceStatus.js'],resolve);
            }

        },
        {
            path: '/sigin/signInManager/', component: function (resolve) {
            require.async(['modules/sigin/signInManager/signInManager.js'],resolve);
        }
        },
        {
            path: '/planeProject/flyRequest', component: function (resolve) {
            require.async(['modules/planeProject/flyRequest/flyRequest.js'],resolve);
        }
        },
        {
            path: '/planeProject/query', component: function (resolve) {
            require.async(['modules/planeProject/query/flyRequestManager.js'],resolve);
        }
        },


        {

            path: '/vehicle/vehicleBase/', component: function (resolve) {
            require.async(['modules/vehicle/vehicleBase/vehicleBase.js'],resolve);
        }

        },{

            path: '/flightInfo/enter/', component: function (resolve) {
                require.async(['modules/sysSetting/flightInfo/enter/enter.js'],resolve);

            }

        },
        {
            path: '/flightInfo/query/', component: function (resolve) {
            require.async(['modules/sysSetting/flightInfo/query/query.js'],resolve);
        }
        },
        {
            path: '/flightPlanes/mediumAndLongs', component: function (resolve) {
            require.async(['modules/flightPlane/mediumAndLong/flightPlane.js'],resolve);
        }
        }

        ,{
            path: '/flightPlane/enter/', component: function (resolve) {
                require.async(['modules/flightPlane/enter/enter.js'],resolve);

            }
        },{
            path: '/flightPlane/query/:type', component: function (resolve) {
                require.async(['modules/flightPlane/query/query.js'],resolve);

            }
        },
        {
            path: '/groundServiceScheduling/serviceBill', component: function (resolve) {
            require.async(['modules/groundServiceScheduling/serviceBill/serviceBill.js'],resolve);
        }
        },
        {
            path: '/flightPlane/gante', component: function (resolve) {
            require.async(['modules/flightPlane/gante/gante.js'],resolve);
        }
        },


        {
            path: '/sysSetting/contractManage/', component: function (resolve) {
            require.async(['modules/sysSetting/contractManage/contractManage.js'],resolve);

        }
        },
        {
            path: '/groundServiceScheduling/query/', component: function (resolve) {
            require.async(['modules/groundServiceScheduling/query/query.js'],resolve);
        }
        },
        {
            path: '/sysSetting/contractManage/', component: function (resolve) {
            require.async(['modules/sysSetting/contractManage/contractManage.js'],resolve);
        }
        },
        {
            path: '/sysmgr/fboModuleMgr/', component: function (resolve) {
            require.async(['sysmgr/fboModuleMgr/fboModuleMgr.js'],resolve);

        }
        },
        {
            path: '/sysmgr/fboRoleMgr/', component: function (resolve) {
            require.async(['sysmgr/fboRoleMgr/fboRoleMgr.js'],resolve);

        }
        },
        {
            path: '/sysmgr/fboUserMgr/', component: function (resolve) {
            require.async(['sysmgr/fboUserMgr/fboUserMgr.js'],resolve);

        }
        },
        {
            path: '/sysmgr/deptMgr/:type', component: function (resolve) {
            require.async(['sysmgr/deptMgr/deptMgr.js'],resolve);
        }
        },
        {
            path: '/groundServiceScheduling/scheduling/', component: function (resolve) {
            require.async(['modules/groundServiceScheduling/scheduling/schedule.js'], resolve);
        }
        },
        {
            path: '/groundServiceScheduling/scheduling2/', component: function (resolve) {
            require.async(['modules/groundServiceScheduling/scheduling2/schedule.js'], resolve);
        }
        },
        {
            path: '/modules/groundServiceScheduling/duty', component: function (resolve) {
            require.async(['modules/groundServiceScheduling/duty/duty.js'], resolve);
        }
        },
        {
            path: '/groundServiceScheduling/dutyOfWeek', component: function (resolve) {
            require.async(['modules/groundServiceScheduling/dutyOfWeek/dutyOfWeek.js'], resolve);
            }
        },
        {
            path: '/groundServiceScheduling/dutyOfWeekTest', component: function (resolve) {
            require.async(['modules/groundServiceScheduling/dutyOfWeekTest/dutyOfWeek.js'], resolve);
        }
        },
        {
            path: '/groundServiceScheduling/scheduleTable/', component: function (resolve) {
            require.async(['modules/groundServiceScheduling/scheduleTable/scheduleTable.js'], resolve);
        }
        },
        {
            path: '/maintenanceAndMaintenance/equipment/', component: function (resolve) {
            require.async(['modules/maintenanceAndMaintenance/equipment/equipManager.js'], resolve);
        }
        }


    ]

    const router = new VueRouter({
        routes:routes // （缩写）相当于 routes: routes
    })

// 4. 创建和挂载根实例。
// 记得要通过 router 配置参数注入路由，
// 从而让整个应用都有路由功能

    const app = new Vue({
        el:"#app",
        router:router,
        data:{
            tittle:"首页",
            activeIndex: '',
            activeIndex2: '',
            isCollapse:false,
            isAsideShrink: false,
            sideMenus: [{
                title: '首页',
                icon: 'el-icon-information',
            }, {
                title: '团队管理',
                icon: 'fa fa-users',
                children: [{
                    title: '分类'
                }, {
                    title: '成员管理'
                }, {
                    title: '数据分配'
                }]
            }, {
                title: '开发管理',
                icon: 'el-icon-message'
            }, {
                title: '数据质量管理',
                icon: 'el-icon-menu'
            }, {
                title: '标准化管理',
                icon: 'el-icon-setting'
            }]
        },
        methods: {
            handleSelect:function(key, keyPath) {
                console.log(key, keyPath);
            },
            handleOpen:function(key, keyPath) {
                console.log(key, keyPath);
            },
            handleClose:function(key, keyPath) {
                console.log(key, keyPath);
            }
        },
        created:function (){
            var $this = this;
            messages.$on('change',function(value) {
                document.title=value;
                $this.tittle = value;
            });
        }
    }).$mount('#app')
});